When developing web-application code that is to be executed within a client program executing on a device (e.g., to support an implementation of a user interface of a web application that is accessed from the device), a developer typically must choose between developing the web-application code for the native layer (e.g., operating system) of the device (e.g., in C or Objective C for the Apple iOS devices or in Java for Android devices) or developing the web-application code for a cross-platform layer supported by the device (e.g., in JavaScript, AJAX, or another web-application development technology that enables the same web-application code to be executed on multiple devices having different native layers).
An advantage of developing the web-application code for a cross-platform layer supported by the device is that the web-application code will execute on additional devices that also support the same cross-platform layer. However, for various reasons, including that the cross-platform layer is at least one layer removed from the underlying hardware (e.g., the processor and memory) or software (e.g., a graphics engine) of the device, there may be disadvantages to implementing the web-application code in the cross platform layer. For example, the cross-platform layer may not support access to native features of the device (e.g., a gyroscope, accelerometer, camera, video camera, vibration mechanism, and so on) or the level of performance may be poor relative to the level of performance of the web application if it was implemented for the native layer of the device. For example, application code developed for the cross-platform layer of the device may not be able to draw advanced, complex, or three-dimensional animations, whereas application code developed for the native layer of the device may be able to draw such animations.